﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using XStudio.XCRF.Utilities.Base64Encryption;
using XStudio.XCRF.Utilities.MD5Encryption;

namespace XStudio.XCRF.Web.Models.Member
{
    public class MemberChangePasswordDTO
    {
        public Guid MemberID { get; set; }
        public string OldPasscode
        {
            get { return null; }
            set { OldPasswordMD5 = value.Base64Decode().MD5Encode32(); }
        }
        public string OldPasswordMD5 { get; set; }
        public string NewPasscode1
        {
            get { return null; }
            set { NewPasswordMD51 = value.Base64Decode().MD5Encode32(); }
        }
        public string NewPasswordMD51 { get; set; }
        public string NewPasscode2
        {
            get { return null; }
            set { NewPasswordMD52 = value.Base64Decode().MD5Encode32(); }
        }
        public string NewPasswordMD52 { get; set; }
        public bool IsValid { get { return NewPasswordMD51 == NewPasswordMD52; } }
    }
}